package com.zhku.search.controller;


import com.zhku.base.model.PageParams;
import com.zhku.search.dto.SearchGoodsParamDto;
import com.zhku.search.dto.SearchPageResultDto;
import com.zhku.search.po.GoodsIndex;
import com.zhku.search.service.GoodsSearchService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api(value = "商品搜索接口", tags = "商品搜索接口")
@RestController
@RequestMapping("/goods")
public class GoodsSearchController {

    @Autowired
    GoodsSearchService goodsSearchService;


    @ApiOperation("商品搜索列表")
    @GetMapping("/list")
    public SearchPageResultDto<GoodsIndex> list(PageParams pageParams, SearchGoodsParamDto searchGoodsParamDto) {

        return goodsSearchService.queryGoodsPubIndex(pageParams, searchGoodsParamDto);

    }
}
